<?php get_header(); ?>

<?php 
if (have_posts()): $post = $posts[0]; ?>
 
<?if (is_day()): ?>
    <h1><?php the_time('F jS, Y'); ?></h1>
<?elseif (is_month()): ?>
    <h1><?php the_time('F, Y'); ?></h1>
<?elseif (is_year()): 
    $query_string = "year=".get_the_time('Y');
    ?>
    <h1><?php the_time('Y'); ?></h1>
<?elseif (is_category()): ?>
    <h1><?=single_cat_title();?></h1>
<?elseif (is_search()): ?>
    <h1>Search Results</h1>
<?elseif (is_author()): ?>
    <h1>Author Archive</h1>
<?else: ?>
    <h1>Archives</h1>
<?endif;?>

<?php /*
<div class="tt-contents-col tt-contents-a">
<div id="tt-monthly-archives" class="boxed">
    <h3>Monthly Archives</h3>
    <ul class="list-idx"><?php wp_get_archives('type=monthly'); ?></ul>
</div>

</div>
*/?>

<ul class="posts">
<?php 
while (have_posts()) : the_post(); 
$show = false;
foreach (get_the_category() as $category) {
    if ($category->cat_ID == 1) $show = true;
}
if ($show):
?>

<li><a class="title" href="<?php the_permalink() ?>"><?php the_title(); ?></a> 
<small><?php the_time('M d Y'); ?>, <a href="<?php comments_link() ?>" class="comments"><?php comments_number('No Comments', '1 Comment', '% Comments', '', 'Comments off'); ?></a><?php //comments_popup_link('no comments', '1 comment', '% comments'); ?></small><br />
<?php the_excerpt(); ?>
</li>

<?php 
endif; // show
endwhile; ?>
</ul>

<h4>Other Posts</h4>
<ul class="other-posts">
<?
while (have_posts()) : the_post(); 
$noshow = false;
foreach (get_the_category() as $category) {
    if ($category->cat_ID == 1) $noshow = true;
}
if (!$noshow):
?>

<li><a class="title" href="<?php the_permalink() ?>"><?php the_title(); ?></a> 
<small><?php the_time('M d Y'); ?>, <a href="<?php comments_link() ?>" class="comments"><?php comments_number('No Comments', '1 Comment', '% Comments', '', 'Comments off'); ?></a><?php //comments_popup_link('no comments', '1 comment', '% comments'); ?></small><br />
</li>

<?php 
endif; // show
endwhile; ?>
</ul>

<div class="posts_nav_link">
<?php posts_nav_link(' ','Back','More &gt;'); ?>
</div>

<?php endif; ?>

<?php get_footer(); ?>
